import React from 'react';
import ReactDOM from 'react-dom';
import {Provider} from 'react-redux'
import {PersistGate} from 'redux-persist/lib/integration/react';

import App from './App';
import store from './redux/store'
import {persistor} from './redux/store'
import { 
  BrowserRouter as Router, 
  Route, 
  Switch,
  withRouter,  
} from 'react-router-dom'

ReactDOM.render(
  <Router>
      <Provider store={store}>
      {/* 这是作数据持久化 */}
      <PersistGate loading={null} persistor={persistor}> 
        <App />
      </PersistGate>
    </Provider>
  </Router>,
  document.getElementById('root')
);

